const axios = require('axios');
// 搜索参数
export class WarningDataSearchArgs{
  constructor(){
    this.offset=0;
    this.num=10;
  }

}

const BASE_URL = "http://47.97.65.11:3002/data-service/search-list"
const url= "http://47.97.65.11:3002/data-service/warn-detail-list"
export async function WarningDataList(searchArgs=new WarningDataSearchArgs()) {
  try {
    const res=await axios({
      method:'get',
      url:BASE_URL,
      params:{
        ...searchArgs
      },
      withCredentials:false      //跨域访问过程中是否携带cookie
    })
    return res;
  }
  catch (error) {
    console.error(error)
  }
}
export async function TableDataList(f011) {
  try {
    const res=await axios({
      method:'get',
      url:url,
      params:{
        f011:f011
      },
      withCredentials:false      //跨域访问过程中是否携带cookie
    })
    return res;
  }
  catch (error) {
    console.error(error)
  }
}
